import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';

import { PersonCenterComponent } from '@core/baseModule/person-center/person-center.component';
import { PersonInfoComponent } from '@core/baseModule/person-center/person-info/person-info.component';
import { PersonPasswordComponent } from '@core/baseModule/person-center/person-password/person-password.component';
import { RoleSetComponent } from '@core/baseModule/person-center/role-set/role-set.component';

const routes: Routes = [
  {

    path: '',
    component: PersonCenterComponent,
    data: {
      breadcrumb: '个人中心'
    },
    children: [
      { path: '', redirectTo: 'personInfo', pathMatch: 'full' },
      {
        path: 'personInfo',
        component: PersonInfoComponent,
      },
      {
        path: 'personPassword',
        component: PersonPasswordComponent,
      },
      {
        path: 'roleSet',
        component: RoleSetComponent,
      }
    ]
  }
];

@NgModule({
  imports: [CommonModule, RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class PersonCenterRoutingModule {}
